package service.impl;

import dao.ICompanyDao;
import dao.Impl.CompanyImpl;
import model.CompanyModel;
import service.ICompanyService;

import java.util.List;

public class CompanyServiceImpl implements ICompanyService {

    @Override
    public int add(CompanyModel companyModel) {
        ICompanyDao dao =new CompanyImpl();
        return dao.add(companyModel);
    }

    @Override
    public int update(CompanyModel companyModel) {
        ICompanyDao dao =new CompanyImpl();
        return dao.update(companyModel);
    }

    @Override
    public int del(CompanyModel companyModel) {
        ICompanyDao dao =new CompanyImpl();
        return dao.del(companyModel);
    }

    @Override
    public List<CompanyModel> findAll() {
        ICompanyDao dao =new CompanyImpl();
        return dao.findAll();
    }

    @Override
    public CompanyModel findById(CompanyModel companyModel) {
        ICompanyDao dao =new CompanyImpl();
        return dao.findById(companyModel);
    }

    @Override
    public List<CompanyModel> findBySome(CompanyModel companyModel) {
        ICompanyDao dao =new CompanyImpl();
        return dao.findBySome(companyModel);
    }
}
